Field of the Invention
The invention relates to a method for real time computation of the state variables of a hybrid differential-algebraic process model (DAP) in succeeding time steps on a process computer with a process interface, the process computer being set up such that, via the process interface, at least one process variable of a physical process can be detected and/or one output for influencing the physical process can be output by the process computer, the hybrid DAP being solved at least by one integrator functionality, one condition evaluation functionality and with identification of a condition change by a consistency detection functionality for structure decision variables, and depending on the structure decision variables parts of the hybrid DAP being active or inactive.
Description of Related Art
Process computers and methods of the above described type which are to be executed on process computers are quite generally used in technical problem formulations to specifically observe a physical process and/or to specifically affect this physical process in order to influence it in the desired manner. Often process models—therefore functional physical-technical relationships which can be described by mathematical equations—are implemented on these process computers, and for example, for control purposes constitute a mathematical model of the linked physical process, or mathematically simulate a process which is different from the linked physical process and which simulates a part of reality, for example, for excitation of the “real” physical process, as is known, for example, for simulators. These process computers and methods especially from the domain of control device development (rapid control prototyping, hardware-in-the-loop tests) can no longer be dispensed with.
Depending on the type of process which is to be computed and modeled on the process computer, the process model has different mathematical properties. Many process models consist of a system of linear or nonlinear differential equations, in the simplest case of a single differential equation. These differential equations are solved with the known numerical methods, hereinafter called integrator functionality.
Since the process computer is conventionally joined to a real physical process, it is necessary to compute the process model in real time so that process variables of the linked physical process can be detected and further processed in the desired time reference—defined by the succeeding time steps on the process computer—and outputs for influencing the physical process can be output from the process computer.
Many process models in addition to differential equations or differential equation systems also comprise algebraic equations which typically describe the behavior of conservation quantities in the process. Simple relationships of this type are, for example, currents in nodes of an electrical network, the energy constancy in a closed system, the volume flow of an incompressible medium, the conservation of momentum in a multibody system and other secondary kinetic conditions. These models are called differential-algebraic process models, hereinafter “DAP” for short.
DAP are often structurally-invariant, i.e., they fix the state variables of the process model and the relationships between the state variables a priori, the mathematical framework as such does not change, neither over time nor depending on other conditions. These systems can be transferred into a complete algorithmic model—for example in the form of C-code—due to their structural invariance before the running time of the computation, and before the start of computation the structurally-invariant models can be optimized with the known mathematical methods for minimizing computation effort, therefore for example by BLT transforms, tearing or sparse-matrix methods. From the running time-optimized algorithmic model, then, a process model which can be executed on the process computer can be prepared, therefore, for example, by completion of the above cited C-code.
More complex process models are, however, often structurally variant, they have different modes which are characterized in that, for example, different combinations of state variables or different relationships between a choice of state variables which remains the same describe the functionality of the process model, these different modes of the process model being activated or deactivated depending on certain conditions. The quantities which decide whether a hybrid DAP undergoes a structure change are called structure decision variables here; structure decision variables are usually discrete variables whose values change depending on condition equations, the condition equations being evaluated by the initially mentioned condition evaluation functionality. A structurally variant differential-algebraic model is called a hybrid DAP. Depending on the structure decision variables of the process model therefore different parts of the hybrid DAP are activated or deactivated so that a certain mode of the hybrid DAP is less complex (in the sense of comprehensive) than the hybrid DAP which is omnipotent and encompasses all possible modes, therefore possible active structures of the hybrid DAP.
In order to be able to compute the mode of a hybrid DAP, known computation methods have an integrator functionality, therefore, a conventional numerical integrator for solving differential equations.
Within the scope of the condition evaluation functionality condition equations are evaluated, as a result of which structure decision variables can change. As a result of the change of a structure decision variable—or the change of several structure decision variables—the mode of the process model can change, but it is only one necessary prerequisite for a mode change.
One example for a hybrid DAP could be a motor with the pertinent gear train, the different gear stages being different structures of the hybrid DAP, of which, for example, only one gear stage can ever be active. Structure decision variables in this connection could be dependent, for example, on the engine speed, the power demands of the driver and the mechanical load on the transmission. Depending on these structure decision variables, it is decided whether there is a structure change or not within one computation step or from one computation step to the next computation step.
The condition evaluation functionality alone does not guarantee that a stable set of structure decision variables—more exactly a stable set of values for the structure decision variables—is found, for this purpose the initially mentioned consistency detection functionality is used. The consistency detection functionality is optionally iteratively executed, consistency of the structure decision variables being present when the structure decision variables—more exactly: the values for the individual structure decision variables—no longer change. This consistency detection functionality is always executed when the condition evaluation functionality has recognized the change of at least one structure decision variable. Within the consistency detection functionality the values computed beforehand for the state variables and the time are “fixed”, the derivations of the state variables, algebraic variables and the condition equations are however always re-evaluated again, finally its always being determined whether the values which have been determined beforehand for the structure decision variables are in agreement with the newly determined values for the structure decision variables. If this is the case, the consistency checking ends, and if this is not the case, the consistency checking must be continued until a stable state is achieved, in the ideal case. In practice, the iteration must be aborted if consistency is not achieved, then other procedures take effect which, however, are not the subject of the examination. During execution of the consistency detection functionality, as a result of the change of the structure decision variables, changing portions of the hybrid DAP can have become active, the consistency check therefore presupposes that the complete hybrid DAP is available to it.
In a further step, it can be determined at what instant exactly the structure decision variable has assumed another value—the evaluation of a condition equation has therefore led to another result—which can cause a structure change of the hybrid DAP. This instant can lie anywhere in the computation interval between two discrete computation instants. The computation of the condition evaluation function is generally based on equations or inequalities by whose evaluation structure decision variables are changed. Mathematically, the zero crossing of a function is determined here, the instant tc of the zero crossing of this function corresponding to the instant of the condition change. If this instant tc of the condition change is known, the consistency detection functionality is started which is designed to determine at time tc of the condition change that set of structure decision variables or values of structure decision variables which is stable and first of all does not entail any further change. For this purpose the entire hybrid DAP must always be recomputed at least once.
It is clearly apparent from the described procedure that, when a condition change is recognized within one computation step, at least one additional integration of the hybrid DAP is necessary compared to the “normal” integration of the active part of a hybrid DAP when there is no change of condition. If, as described above, back computation to the exact instant between two computation steps takes place, in the case of a condition change, at least one another—therefore—third integration of the hybrid DAP is also necessary. It is immediately illuminating that this additional effort can lead to major problems within the real time computation since the added time consumption may be so high that within the desired time reference—duration of the sampling period of the real time computation—a computation is not possible and the time is exceeded which can have serious consequences in the systems which are examined here and which have a direct relationship via the process interface to a physical process. The running time behavior of the real time computation of the state variables of hybrid DAPs is difficult to calculate in the above described method, the computation time in the case of a condition change of the hybrid DAP can exceed the computation time by several times without a condition change being present.